<?php
namespace app\validate;
use think\Validate;

class Brand extends Validate{
    protected $rule = [
        'brand_name' => 'require',
        'brand_url'=>'require',
        'brand_img'=>'require',
        'brand_desc'=>'require',
        'status'=>'require|integer'
    ];
    protected $message = [
        'brand_name.require'=>'品牌必填',
        'brand_url.require'=>'品牌官网必填',
        'brand_img.require'=>'品牌图片必填',
        'brand_desc.require'=>'品牌描述必填',
        'status.require'=>'品牌状态必填',
        'status.integer'=>'品牌状态请输入整数',
    ];
    protected $scene = [
        'add'=>['brand_name','brand_url','brand_img','brand_desc','brand_status'],
        'edit'=>['brand_name','brand_url','brand_img','brand_desc','brand_status']
    ];
}